<?php
/*----------------------------------------------------------------------
#Youjoomla Styleeswitch  - 
# ----------------------------------------------------------------------
# Copyright (C) 2007 You Joomla. All Rights Reserved.
# Designed by: You Joomla
# License: Copyright
# Website: http://www.youjoomla.com
------------------------------------------------------------------------*/

defined( '_JEXEC' ) or die( 'Restricted index access' );
session_start();
$mystyles = array();


$mystyles['red']['file'] = "red";
$mystyles['blue']['file'] = "blue";
$mystyles['green']['file'] = "green"; 
$mystyles['orange']['file'] = "orange"; // default


$mystyles['green']['label'] = '<img src="templates/'.$this->template.'/images/green.gif" height="13px" width="13px" alt="Green" title="Green" />';
$mystyles['red']['label'] = '<img src="templates/'.$this->template.'/images/red.gif" height="13px" width="13px" alt="Red" title="Red" />';
$mystyles['blue']['label'] = '<img src="templates/'.$this->template.'/images/blue.gif" height="13px" width="13px" alt="Blue" title="Blue" />';
$mystyles['orange']['label'] = '<img src="templates/'.$this->template.'/images/orange.gif" height="13px" width="13px"  alt="Orange" title="Orange" />&nbsp;';







if (isset($_GET['change_css']) && $_GET['change_css'] != "") {
    $_SESSION['css'] = $_GET['change_css'];
} else {
    $_SESSION['css'] = (!isset($_SESSION['css'])) ? $default_color : $_SESSION['css'];
}
switch ($_SESSION['css']) {
    case "green":
    $css_file = "green";
    break;
    case "red":
    $css_file = "red";
    break;
	case "blue":
    $css_file = "blue";
    break;
	case "orange":
    $css_file = "orange";
    break;
	default:
    $css_file = "green";
}




//FONT SWITCH

$myfont = array();


$myfont['small']['file'] = "9px";
$myfont['medium']['file'] = "12px";
$myfont['large']['file'] = "16px"; // default

$myfont['small']['label'] = '<img src="templates/'.$this->template.'/images/small.gif" alt="Small" title="Small" />';
$myfont['medium']['label'] = '<img src="templates/'.$this->template.'/images/medium.gif" alt="Medium" title="Medium" />';

$myfont['large']['label'] = '<img src="templates/'.$this->template.'/images/large.gif" alt="Large" title="Large" />&nbsp;';




if (isset($_GET['change_font']) && $_GET['change_font'] != "") {
    $_SESSION['font'] = $_GET['change_font'];
} else {
    $_SESSION['font'] = (!isset($_SESSION['font'])) ? $default_font : $_SESSION['font'];
}
switch ($_SESSION['font']) {
    case "small":
    $css_font = "9px";
    break;
    case "medium":
    $css_font = "12px";
    break;
	case "large":
    $css_font = "16px";
    break;
    default:
    $css_font = "12px";
}

//WIDTH SWITCH


$mywidth = array();

$mywidth['narrow']['file'] = "776px";
$mywidth['wide']['file'] = "1000px";

$mywidth['narrow']['label'] = '<img src="templates/'.$this->template.'/images/narrow.gif" alt="Narrow" title="Narrow" />';
$mywidth['wide']['label'] = '<img src="templates/'.$this->template.'/images/wide.gif" alt="Wide" title="Wide" />';




if (isset($_GET['change_width']) && $_GET['change_width'] != "") {
    $_SESSION['width'] = $_GET['change_width'];
} else {
    $_SESSION['width'] = (!isset($_SESSION['width'])) ? $default_width : $_SESSION['width'];
}
switch ($_SESSION['width']) {
    case "wide":
    $css_width = "980px";
	$bannerwidth="468px";
	$toolbox_m = "3px 0 0 600px";
	$inset_m ="0 165px";
	$alignads = "auto";
	$fauximg = "faux980.gif";
	$boja ="boja_wide";
    break;
    case "narrow":
    $css_width = "756px";
	$bannerwidth="468px";
	$toolbox_m = "3px 0 0 395px";
	$inset_m ="0 53px";
	$fauximg = "faux756.gif";
	$boja ="boja_narrow";
	$alignads ="auto";
    break;
    default:
    $css_width = "1000px";
}

?>